3.1.20 \(\int \frac {1}{(c+d x)^2 (a+a \coth (e+f x))} \, dx\) [20]

Optimal. Leaf size=159 \[ \frac {f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{a d^2}-\frac {1}{d (c+d x) (a+a \coth (e+f x))}-\frac {f \text {Chi}\left (\frac {2 c f}{d}+2 f x\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{a d^2}-\frac {f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{a d^2}+\frac {f \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{a d^2} \]

[Out]

f*Chi(2*c*f/d+2*f*x)*cosh(-2*e+2*c*f/d)/a/d^2-1/d/(d*x+c)/(a+a*coth(f*x+e))-f*cosh(-2*e+2*c*f/d)*Shi(2*c*f/d+2
*f*x)/a/d^2+f*Chi(2*c*f/d+2*f*x)*sinh(-2*e+2*c*f/d)/a/d^2-f*Shi(2*c*f/d+2*f*x)*sinh(-2*e+2*c*f/d)/a/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3805, 3384, 3379, 3382} \begin {gather*} -\frac {f \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{a d^2}+\frac {f \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \cosh \left (2 e-\frac {2 c f}{d}\right )}{a d^2}+\frac {f \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{a d^2}-\frac {f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{a d^2}-\frac {1}{d (c+d x) (a \coth (e+f x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((c + d*x)^2*(a + a*Coth[e + f*x])),x]

[Out]

(f*Cosh[2*e - (2*c*f)/d]*CoshIntegral[(2*c*f)/d + 2*f*x])/(a*d^2) - 1/(d*(c + d*x)*(a + a*Coth[e + f*x])) - (f
*CoshIntegral[(2*c*f)/d + 2*f*x]*Sinh[2*e - (2*c*f)/d])/(a*d^2) - (f*Cosh[2*e - (2*c*f)/d]*SinhIntegral[(2*c*f
)/d + 2*f*x])/(a*d^2) + (f*Sinh[2*e - (2*c*f)/d]*SinhIntegral[(2*c*f)/d + 2*f*x])/(a*d^2)

Rule 3379

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[I*(SinhIntegral[c*f*(fz/
d) + f*fz*x]/d), x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*e - c*f*fz*I, 0]

Rule 3382

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CoshIntegral[c*f*(fz/d)
+ f*fz*x]/d, x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*(e - Pi/2) - c*f*fz*I, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3805

Int[1/(((c_.) + (d_.)*(x_))^2*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])), x_Symbol] :> -Simp[(d*(c + d*x)*(a + b*
Tan[e + f*x]))^(-1), x] + (-Dist[f/(a*d), Int[Sin[2*e + 2*f*x]/(c + d*x), x], x] + Dist[f/(b*d), Int[Cos[2*e +
 2*f*x]/(c + d*x), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{(c+d x)^2 (a+a \coth (e+f x))} \, dx &=-\frac {1}{d (c+d x) (a+a \coth (e+f x))}-\frac {(i f) \int \frac {\sin \left (2 \left (i e+\frac {\pi }{2}\right )+2 i f x\right )}{c+d x} \, dx}{a d}-\frac {f \int \frac {\cos \left (2 \left (i e+\frac {\pi }{2}\right )+2 i f x\right )}{c+d x} \, dx}{a d}\\ &=-\frac {1}{d (c+d x) (a+a \coth (e+f x))}+\frac {\left (f \cosh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{a d}-\frac {\left (f \cosh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{a d}-\frac {\left (f \sinh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{a d}+\frac {\left (f \sinh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{a d}\\ &=\frac {f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{a d^2}-\frac {1}{d (c+d x) (a+a \coth (e+f x))}-\frac {f \text {Chi}\left (\frac {2 c f}{d}+2 f x\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{a d^2}-\frac {f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{a d^2}+\frac {f \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{a d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.55, size = 206, normalized size = 1.30 \begin {gather*} -\frac {\text {csch}(e+f x) \left (\cosh \left (\frac {c f}{d}\right )+\sinh \left (\frac {c f}{d}\right )\right ) \left (d \left (\cosh \left (e+f \left (-\frac {c}{d}+x\right )\right )-\cosh \left (e+f \left (\frac {c}{d}+x\right )\right )+\sinh \left (e+f \left (-\frac {c}{d}+x\right )\right )+\sinh \left (e+f \left (\frac {c}{d}+x\right )\right )\right )+2 f (c+d x) \text {Chi}\left (\frac {2 f (c+d x)}{d}\right ) \left (-\cosh \left (e-\frac {f (c+d x)}{d}\right )+\sinh \left (e-\frac {f (c+d x)}{d}\right )\right )+2 f (c+d x) \left (\cosh \left (e-\frac {f (c+d x)}{d}\right )-\sinh \left (e-\frac {f (c+d x)}{d}\right )\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )\right )}{2 a d^2 (c+d x) (1+\coth (e+f x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((c + d*x)^2*(a + a*Coth[e + f*x])),x]

[Out]

-1/2*(Csch[e + f*x]*(Cosh[(c*f)/d] + Sinh[(c*f)/d])*(d*(Cosh[e + f*(-(c/d) + x)] - Cosh[e + f*(c/d + x)] + Sin
h[e + f*(-(c/d) + x)] + Sinh[e + f*(c/d + x)]) + 2*f*(c + d*x)*CoshIntegral[(2*f*(c + d*x))/d]*(-Cosh[e - (f*(
c + d*x))/d] + Sinh[e - (f*(c + d*x))/d]) + 2*f*(c + d*x)*(Cosh[e - (f*(c + d*x))/d] - Sinh[e - (f*(c + d*x))/
d])*SinhIntegral[(2*f*(c + d*x))/d]))/(a*d^2*(c + d*x)*(1 + Coth[e + f*x]))

________________________________________________________________________________________

Maple [A]
time = 10.34, size = 91, normalized size = 0.57

method result size
risch \(-\frac {1}{2 d \left (d x +c \right ) a}+\frac {f \,{\mathrm e}^{-2 f x -2 e}}{2 a d \left (d x f +c f \right )}-\frac {f \,{\mathrm e}^{\frac {2 c f -2 d e}{d}} \expIntegral \left (1, 2 f x +2 e +\frac {2 c f -2 d e}{d}\right )}{a \,d^{2}}\) \(91\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(d*x+c)^2/(a+a*coth(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

-1/2/d/(d*x+c)/a+1/2*f/a*exp(-2*f*x-2*e)/d/(d*f*x+c*f)-f/a/d^2*exp(2*(c*f-d*e)/d)*Ei(1,2*f*x+2*e+2*(c*f-d*e)/d
)

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 57, normalized size = 0.36 \begin {gather*} -\frac {1}{2 \, {\left (a d^{2} x + a c d\right )}} + \frac {e^{\left (\frac {2 \, c f}{d} - 2 \, e\right )} E_{2}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{2 \, {\left (d x + c\right )} a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*x+c)^2/(a+a*coth(f*x+e)),x, algorithm="maxima")

[Out]

-1/2/(a*d^2*x + a*c*d) + 1/2*e^(2*c*f/d - 2*e)*exp_integral_e(2, 2*(d*x + c)*f/d)/((d*x + c)*a*d)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 247, normalized size = 1.55 \begin {gather*} \frac {{\left (d f x + c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) \cosh \left (-\frac {2 \, {\left (c f - d \cosh \left (1\right ) - d \sinh \left (1\right )\right )}}{d}\right ) + {\left ({\left (d f x + c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \cosh \left (-\frac {2 \, {\left (c f - d \cosh \left (1\right ) - d \sinh \left (1\right )\right )}}{d}\right ) - d\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) - {\left ({\left (d f x + c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + {\left (d f x + c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )} \sinh \left (-\frac {2 \, {\left (c f - d \cosh \left (1\right ) - d \sinh \left (1\right )\right )}}{d}\right )}{{\left (a d^{3} x + a c d^{2}\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + {\left (a d^{3} x + a c d^{2}\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*x+c)^2/(a+a*coth(f*x+e)),x, algorithm="fricas")

[Out]

((d*f*x + c*f)*Ei(-2*(d*f*x + c*f)/d)*cosh(f*x + cosh(1) + sinh(1))*cosh(-2*(c*f - d*cosh(1) - d*sinh(1))/d) +
 ((d*f*x + c*f)*Ei(-2*(d*f*x + c*f)/d)*cosh(-2*(c*f - d*cosh(1) - d*sinh(1))/d) - d)*sinh(f*x + cosh(1) + sinh
(1)) - ((d*f*x + c*f)*Ei(-2*(d*f*x + c*f)/d)*cosh(f*x + cosh(1) + sinh(1)) + (d*f*x + c*f)*Ei(-2*(d*f*x + c*f)
/d)*sinh(f*x + cosh(1) + sinh(1)))*sinh(-2*(c*f - d*cosh(1) - d*sinh(1))/d))/((a*d^3*x + a*c*d^2)*cosh(f*x + c
osh(1) + sinh(1)) + (a*d^3*x + a*c*d^2)*sinh(f*x + cosh(1) + sinh(1)))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{c^{2} \coth {\left (e + f x \right )} + c^{2} + 2 c d x \coth {\left (e + f x \right )} + 2 c d x + d^{2} x^{2} \coth {\left (e + f x \right )} + d^{2} x^{2}}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*x+c)**2/(a+a*coth(f*x+e)),x)

[Out]

Integral(1/(c**2*coth(e + f*x) + c**2 + 2*c*d*x*coth(e + f*x) + 2*c*d*x + d**2*x**2*coth(e + f*x) + d**2*x**2)
, x)/a

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 321 vs. \(2 (159) = 318\).
time = 0.44, size = 321, normalized size = 2.02 \begin {gather*} \frac {{\left (2 \, {\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} f^{2} {\rm Ei}\left (-\frac {2 \, {\left ({\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )} - 2 \, d e f^{2} {\rm Ei}\left (-\frac {2 \, {\left ({\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )} + 2 \, c f^{3} {\rm Ei}\left (-\frac {2 \, {\left ({\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )} + d f^{2} e^{\left (-\frac {2 \, {\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )}}{d}\right )} - d f^{2}\right )} d^{2}}{2 \, {\left ({\left (d x + c\right )} a d^{4} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - a d^{5} e + a c d^{4} f\right )} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*x+c)^2/(a+a*coth(f*x+e)),x, algorithm="giac")

[Out]

1/2*(2*(d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f)*f^2*Ei(-2*((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f)
- d*e + c*f)/d)*e^(-2*(d*e - c*f)/d) - 2*d*e*f^2*Ei(-2*((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e +
c*f)/d)*e^(-2*(d*e - c*f)/d) + 2*c*f^3*Ei(-2*((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^
(-2*(d*e - c*f)/d) + d*f^2*e^(-2*(d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f)/d) - d*f^2)*d^2/(((d*x + c)*a*d
^4*(d*e/(d*x + c) - c*f/(d*x + c) + f) - a*d^5*e + a*c*d^4*f)*f)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\left (a+a\,\mathrm {coth}\left (e+f\,x\right )\right )\,{\left (c+d\,x\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*coth(e + f*x))*(c + d*x)^2),x)

[Out]

int(1/((a + a*coth(e + f*x))*(c + d*x)^2), x)

________________________________________________________________________________________